package com.bishe.demo.modules.ticket.controller;

import com.bishe.demo.modules.ticket.service.ModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description ModelController
 * @Author YHQ
 * @Date 2021/4/1 11:39
 */
@RestController
@RequestMapping("/api")
public class ModelController {
    @Autowired
    private ModelService modelService;
    @GetMapping("/modelId")
    Integer getModelIdByStartPointandEndPoint(@RequestParam String startPoint,@RequestParam String endPoint){
       return modelService.getModelIdByStartPointandEndPoint(startPoint,endPoint);
    }
    @GetMapping("/modelId1/{modelName}")
    Integer getModelIdByModelName(@PathVariable String modelName){
        return modelService.getModelIdByModelName(modelName);
    }

}
